package com.dailyblue.example.springcloud.sentinel.consumer.handler;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.dailyblue.example.springcloud.commons.util.JsonResult;
import com.dailyblue.example.springcloud.commons.util.ResultTool;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class SecondBlockHandler {

    public static JsonResult abc(int index, BlockException e) {
        log.info("进入了blockHandler,e:{}", e);
        return ResultTool.fail(601, "出现异常1-1");
    }
}
